<script language="JavaScript" type="text/javascript">
if ($('resourceList').innerHTML == '') {
	// If resourceList div is empty, populate with new resources
	getNewResources();	
}	

/*
if ($('resourceTree').innerHTML == '') {
	// If resourceTree div is empty, then populate with resource tree
	createResourceTree();	
}
*/
</script>

<div id="containerResources1" style="padding: 10px;">	
	<div id="buttonNew" style="float: left; width: 180px;"><input type="button" class="buttonBig buttonAddBig" value="New Link" onClick="addResource();" title="Add new resource" id="buttonAddResource" /></div>
	<div id="statusDiv" style="float: left;"></div>
	<div style="clear: left; height: 10px;"></div>
	
	<div id="content0FormDiv">
	<div id="formNewResource" class="blueBox" style="display: none;">		
		<input type="hidden" id="formAction" />
		<input type="hidden" id="linkID" />
		<input type="hidden" id="pathID" />
		
		<p><label class="vertLabel">Title</label>
		<input type="text" style="width: 400px;" id="pTitleBox" name="pTitleBox" /></p>
		
		<p><label class="vertLabel">Link URL</label>
		<input type="text" style="width: 400px;" value="http://" id="pURL" name="pURL" /></p>
					
		<p><label class="vertLabel">Short description</label>
		<textarea name="pShortDesc" id="pShortDesc" class="somewhatAdvanced" style="width: 100%; height: 200px;"></textarea>
		</p>
		<p><label>Associated categories for resource</label>
			<? toolTip('productFiles'); echo $toolTip; ?>
		</p>		
		<div id="catContainer">
			<div id="associatedCatContainer" style="margin-top: 10px;"></div>
			<div id="newCat">
				<table>
				<tr>
					<td id="selectParent"></td>
					<td id="pathSave" style="display: none;"><input type="image" onClick="addResourceCat();" src="images/button_add.gif" style="border: none;" title="Add resource category" /></td>
				</tr>
				</table>								
			</div>				
		</div>
		
		<p style="margin-top: 15px; margin-left: 6px;">
			<input type="button" class="buttonBig buttonSaveBig" onClick="saveResource();" value="Save" title="Save resource" />
			<input type="button" class="buttonBig buttonCancelBig" onClick="cancelResource();" value="Cancel" title="Cancel" />
		</p>
	</div>
	</div>
	<!-- New form resource went here -->		
	
	<div id="resourcePath"><h3>New Link Submissions</h3><!-- Displays the resource path just to know where we are --></div>
	<div id="resourceList"></div>
</div>		